-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: tini as ENTRYPOINT and related cosmetics #12707
Conversation
Signed-off-by: Gergely Czuczy <[email protected]>
Signed-off-by: Gergely Czuczy <[email protected]>
Signed-off-by: Gergely Czuczy <[email protected]>
Entrypoint related kubernetes docs: Point is, once the ENTRYPOINT is properly set in the image, no wrappers are needed to start the service through an init (tini in our case), which takes are of signal propagation and other stuff.
Also, the interpreter has been changed to This effectively removes the dependency on |
Reminder for the helm chart: argoproj/argo-helm#1883 |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #12707 +/- ##
==========================================
+ Coverage 47.77% 47.79% +0.02%
==========================================
Files 246 246
Lines 41985 41968 -17
==========================================
+ Hits 20057 20058 +1
+ Misses 19929 19910 -19
- Partials 1999 2000 +1 see 5 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
I wrote a proposal here #12708 thought it might be related |
ArgoCD doesn't need much to run an absolutely distroless image. The following binaries are needed besides argocd, if you disable gpg support:
Helm and kustomize can obviousyl be built statically, so no deps on an distro there. rm is already eliminated by a merged PR, so it won't be needed by 2.7 IIRC tar still has to be investigated. Git is interesting, @crenshaw-dev mentioned that the After this, literally there's no distro needed, just having the argocd binaries and the above mentioned statically linked binaries in the container. You can already build an image like this, based |
glad to see there's initiative working on this. looking forward to 2.7 release. |
@ishitasequeira Could you please review this one? |
Would you be willing to make the cp part its own PR? That would let us get it in for 2.7 even if we can get the full PR done by then. |
I think we'd need to ship both a
I think the git binary is pretty thoroughly enmeshed in our code right now. Moving to a library would be quite a bit of work. I think a statically-linked binary may be the easier short-term approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gczuczy would you mind adding a note to entrypoint.sh and to the upgrade notes that the container specs are changing, and that in 2.8 people must update the manifests instead of just updating the image tag?
Signed-off-by: Gergely Czuczy <[email protected]>
Signed-off-by: Gergely Czuczy <[email protected]>
Signed-off-by: Gergely Czuczy <[email protected]>
Done:
|
I don't know about But providing two kind of images, or at least a Dockerfile for a minimal (near "distroless") image sounds like a good idea. People who need that are typically corporate guys who have a significant focus on security, and they can be expected to be able to customize/alter an image to their specific needs. |
Thanks @gczuczy! lgtm. I'm going to bring this up at the contributors' meeting to make sure everyone is aware of and likes the approach. |
I'm not sure whether that wouldn't create kind of a significant maintenance overhead here, as we'd have to support two distinct images. I'm not against distroless, but imho, maintaining two docker images (or Dockerfiles) would not be the right thing to do. |
* Use tini as the ENTRYPOINT implicitly Signed-off-by: Gergely Czuczy <[email protected]> * Explicitly call /bin/cp instead of relying on PATH Signed-off-by: Gergely Czuczy <[email protected]> * POSIX sh is sufficient for entrypoint.sh Signed-off-by: Gergely Czuczy <[email protected]> * Add 2.6-2.7 to docs indexes Signed-off-by: Gergely Czuczy <[email protected]> * Add note on tini on entry to 2.6-2.7 upgrade notes Signed-off-by: Gergely Czuczy <[email protected]> * Added note to 2.7-2.8 notes on tini as entry Signed-off-by: Gergely Czuczy <[email protected]> --------- Signed-off-by: Gergely Czuczy <[email protected]>
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: